package com.ydj.app.entity.query;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ydj.app.entity.WebUser;
import com.ydj.app.enumerate.MemberLevelEnum;
import com.ydj.framework.mysql.BaseQuery;
import org.apache.commons.lang3.StringUtils;

import java.util.List;
import java.util.Set;

public class WebUserQuery extends BaseQuery<WebUser> {
    public WebUserQuery(IService<WebUser> service) {
        super(service);
    }

    public WebUserQuery id(Long value) {
        eq(WebUser::getId, value);
        return this;
    }

    public WebUserQuery ids(List<Long> value) {
        in(WebUser::getId, value);
        return this;
    }

    public WebUserQuery ids(Set<Long> value) {
        in(WebUser::getId, value);
        return this;
    }

    public WebUserQuery openId(String value) {
        eq(WebUser::getOpenId, value);
        return this;
    }

    public WebUserQuery email(String value) {
        eq(WebUser::getEmail, value);
        return this;
    }

    public WebUserQuery mobile(String value) {
        eq(WebUser::getMobile, value);
        return this;
    }

    public WebUserQuery password(String value) {
        eq(WebUser::getPassword, value);
        return this;
    }

    public WebUserQuery nickNameLike(String value) {
        like(WebUser::getNickName, value);
        return this;
    }

    public WebUserQuery level(MemberLevelEnum value) {
        eq(WebUser::getLevel, value);
        return this;
    }
}